Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODFocusOwnerIterator


InitFocusOwnerIterator

The InitFocusOwnerIterator method initializes this focus-owner iterator object.

void InitFocusOwnerIterator (in ODTypeToken focus, 
                             in ODFocusModule focusModule);
focus
A tokenized string representing the nonexclusive focus type of the owners returned by this iterator, expressed as a 32-bit value.
focusModule
A reference to a focus module that lists the owners of the specified focus.
DISCUSSION
The focus parameter must be the tokenized form of one of the focus constants (kODClipboardFocus, kODKeyFocus, kODMenuFocus, kODModalFocus, kODMouseFocus, kODScrollingFocus, or kODSelectionFocus) or the tokenized form of a part-specific focus type. You can call the session object's Tokenize method to obtain a token corresponding to one of these constants.

This method is not called directly to initialize this focus-owner iterator object, but is called by a subclass-specific initialization method. By convention, every subclass of ODFocusOwnerIterator should have a separate initialization method (for example, the InitMyFocusOwnerIterator method) that is called when an instance of that subclass is created. The override method may have additional parameters beyond those of the InitFocusOwnerIterator method. The InitMyFocusOwnerIterator method should call the inherited InitFocusOwnerIterator method at the beginning of its implementation.

If you subclass ODFocusOwnerIterator, your subclass-specific initialization method, rather than its somInit method, should handle any initialization code that can potentially fail. For example, your initialization method may attempt to allocate memory for your focus-owner iterator.

OVERRIDING
If you subclass ODFocusOwnerIterator, you must not override this method.

SEE ALSO
The ODFocusType type (page 889).
The ODTypeToken type (page 877).
The ODSession::Tokenize method (page 622).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help